<div class="top navbar-fixed-top" role="header">
  <div class="container">
    <a href="#" class="navbar-brand pull-left">
      隐患排查
    </a>
    <button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
      <span class="glyphicon glyphicon-align-justify"></span>
    </button>
    <nav class="navbar-collapse collapse" role="navigation">
      <ul class="navbar-nav nav">
        <li><a href="#/qiyeMain">首页工作提醒</a></li>
        <li><a href="#/qiyeyinhuanByid">隐患核查复查</a></li>
      </ul>
      <!--<form class="navbar-form navbar-left" role="search" style="padding-top: 5px">-->
      <!--<div class="form-group">-->
      <!--<input type="text" class="form-control input-sm" placeholder="搜索你感兴趣的事情">-->
      <!--</div>-->
      <!--<button type="submit" class="btn btn-sm">搜索</button>-->
      <!--</form>-->
      <ul class="nav navbar-nav navbar-right">
        <li><a href="#/logout">退出</a></li>
      </ul>
    </nav>
  </div>
</div>
<!-- Middle content section -->
<br/>
<div class="middle">
  <div class="container">
    <div class="box-inner">
      <form name="addressModelForm1">
        <div class="box-header well" data-original-title="">
          <h2><i class="glyphicon glyphicon-th"></i>企业生产地址信息</h2>

          <div class="box-icon">
            <a ng-click="flag = 'edit'" class="btn btn-edit btn-round btn-default"><i
              class="glyphicon glyphicon-edit bigfont"></i></a>
            <a ng-click="updata()" ng-disabled='!addressModelForm1.$valid' class="btn btn-saveOrUpdate btn-round btn-default"><i
              class="glyphicon glyphicon-ok bigfont"></i></a>
          </div>
        </div>
        <div class="box-content">
          <div class="row">
            <!--查看模式-->
            <div ng-show="flag == 'static'">
              <div class="col-md-12">
                <strong>场地名称</strong>
                <p>
                  <small>{{address.scjydzmc}}</small>
                </p>
              </div>
              <div class="col-md-12">
                <strong>详细地址</strong>
                <p>
                  <small>{{address.scjydz}}</small>
                </p>
              </div>
              <div class="col-md-12">
                <strong>经营范围</strong>
                <p>
                  <small>{{address.manageScope}}</small>
                </p>
              </div>
              <div class="col-md-12">
                <strong>企业隐患填报员</strong>
                <p>
                  <small>{{username}}</small>
                </p>
              </div>
              <div class="col-md-12">
                <strong>所属区域</strong>
                <p>
                  <small>{{address.shi.xqmc + "-"+address.quxian.xqmc + "-"+address.zhenjie.xqmc + "-"+address.shequ.xqmc}}</small>
                </p>
              </div>
              <div class="col-md-12">
                <strong>邮政编码</strong>
                <p>
                  <small>{{address.postCode}}</small>
                </p>
              </div>
              <div class="col-md-12">
                <strong>固定电话</strong>
                <p>
                  <small>{{address.phone}}</small>
                </p>
              </div>
              <div class="col-md-12">
                <strong>移动电话</strong>
                <p>
                  <small>{{address.mobilePhone}}</small>
                </p>
              </div>
              <div class="col-md-12">
                <strong>经营场地类型</strong>
                <p>
                  <small>{{address.entProAddressType.lxms}}</small>
                </p>
              </div>
            </div>


            <!--编辑模式-->
            <div ng-show="flag == 'edit'">
              <div class="col-md-12">
                <strong>场地名称</strong>
                <span class="glyphicon glyphicon-ok" ng-show="addressModelForm1.scjydzmc.$valid"></span>
                <span class="glyphicon glyphicon-remove" ng-show="!addressModelForm1.scjydzmc.$valid"></span>
                <p>
                  <input class="form-control" ng-model="address.scjydzmc" id="scjydzmc" name="scjydzmc" value="{{address.scjydzmc}}" required>
                </p>
              </div>
              <div class="col-md-12">
                <strong>详细地址</strong>
                <span class="glyphicon glyphicon-ok" ng-show="addressModelForm1.scjydz.$valid"></span>
                <span class="glyphicon glyphicon-remove" ng-show="!addressModelForm1.scjydz.$valid"></span>
                <p>
                  <input class="form-control" ng-model="address.scjydz" id="scjydz" name="scjydz" value="{{address.scjydz}}" required>
                </p>
              </div>
              <div class="col-md-12">
                <strong>经营范围</strong>
                <span class="glyphicon glyphicon-ok" ng-show="addressModelForm1.manageScope.$valid"></span>
                <span class="glyphicon glyphicon-remove" ng-show="!addressModelForm1.manageScope.$valid"></span>
                <p>
                  <textarea class="form-control" ng-model="address.manageScope" id="manageScope" name="manageScope" required>{{address.manageScope}}</textarea>
                </p>
              </div>
              <div class="col-md-12">
                <strong>企业隐患填报员</strong>
                <span class="glyphicon glyphicon-ok" ng-show="addressModelForm1.userid.$valid"></span>
                <span class="glyphicon glyphicon-remove" ng-show="!addressModelForm1.userid.$valid"></span>
                <p>
                  <select name="userid" id="userid" ng-model="address.userid" required>
                    <option value="{{entuser.userId}}" ng-repeat="entuser in entusers" ng-selected="entuser.ddm == username">{{entuser.ddm}}</option>
                  </select>
                </p>
              </div>
              <div class="col-md-12">
                <strong>所属区域</strong>
                <span class="glyphicon glyphicon-ok" ng-show="addressModelForm1.shi.$valid&&addressModelForm1.quxian.$valid&&addressModelForm1.zhenjie.$valid"></span>
                <span class="glyphicon glyphicon-remove" ng-show="(!addressModelForm1.shi.$valid)||(!addressModelForm1.quxian.$valid)||(!addressModelForm1.zhenjie.$valid)"></span>
                <p>
                  <select name="shi" id="shi" ng-model="address.shi.xqid" required>
                    <option value="2">广州市</option>
                  </select>
                  <br/>
                  <select name="quxian" id="quxian" ng-model="address.quxian.xqid" ng-change="changequxian()" required>
                  <option value="{{qx.xqid}}" ng-repeat="qx in quxians">{{qx.xqmc}}</option>
                </select>
                  <br/>
                  <select name="zhenjie" id="zhenjie" ng-model="address.zhenjie.xqid" ng-change="changezhenjie()" required>
                  <option value="{{zj.xqid}}" ng-repeat="zj in zhenjies">{{zj.xqmc}}</option>
                </select>
                  <br/>
                  <select name="shequ" id="shequ" ng-model="address.shequ.xqid">
                  <option value="{{sq.xqid}}" ng-repeat="sq in shequs">{{sq.xqmc}}</option>
                </select>
                </p>
              </div>
              <div class="col-md-12">
                <strong>邮政编码</strong>
                <span class="glyphicon glyphicon-ok" ng-show="addressModelForm1.postCode.$valid"></span>
                <span class="glyphicon glyphicon-remove" ng-show="!addressModelForm1.postCode.$valid"></span>
                <p>
                  <input class="form-control" ng-model="address.postCode" id="postCode" name="postCode" value="{{address.postCode}}" required>
                </p>
              </div>
              <div class="col-md-12">
                <strong>固定电话</strong>
                <span class="glyphicon glyphicon-ok" ng-show="addressModelForm1.phone.$valid"></span>
                <span class="glyphicon glyphicon-remove" ng-show="!addressModelForm1.phone.$valid"></span>
                <p>
                  <input class="form-control" ng-model="address.phone" id="phone" name="phone" value="{{address.phone}}" required>
                </p>
              </div>
              <div class="col-md-12">
                <strong>移动电话</strong>
                <span class="glyphicon glyphicon-ok" ng-show="addressModelForm1.mobilePhone.$valid"></span>
                <span class="glyphicon glyphicon-remove" ng-show="!addressModelForm1.mobilePhone.$valid"></span>
                <p>
                  <input class="form-control" ng-model="address.mobilePhone" id="mobilePhone" name="mobilePhone" value="{{address.mobilePhone}}" required>
                </p>
              </div>
              <div class="col-md-12">
                <strong>经营场地类型</strong>
                <span class="glyphicon glyphicon-ok" ng-show="addressModelForm1.lxms.$valid"></span>
                <span class="glyphicon glyphicon-remove" ng-show="!addressModelForm1.lxms.$valid"></span>
                <p>
                  <select name="lxms" id="lxms" ng-model="address.entProAddressType.id">
                    <option value="0">其他</option>
                    <option value="1">建筑工地</option>
                  </select>
                </p>
              </div>
            </div>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>
